package com.etooling.framework.repository;


import com.etooling.framework.entity.DataDir;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DataDirRepository extends BaseRepository<DataDir> {

    @Query(nativeQuery = true, value = "select * from framework.t_data_dir where group_name =?1")
    List<DataDir> getByGroupName(String dataKey);

    @Query(nativeQuery = true, value = "select * from framework.t_data_dir where company_id=?1 and group_name=?2  ")
    List<DataDir> getByCompanyId(String companyId, String groupName);
}
